home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 May / Macworld (1999-05).dmg / Serious Software / FlightCheck Collect 3.52 trial / FLIGHTCHECK® COLLECT! DEMO / FLIGHTCHECKÆ COLLECT! DEMO.rsrc / TEXT_157_FlightScript™.txt < prev    next >
Text File  |  1999-03-16  |  5KB  |  140 lines

  1. FlightScript‚Ñ¢
  2.  
  3. Applescript Functions
  4. FlightCheck provides several scripting functions which you can access via AppleScript¬Æ. While the subject of scripting itself is beyond the scope of this manual, the examples given below can be used to build your scripts:
  5.  
  6. Obtaining a List
  7. Executing the following script will return a list of colors:
  8.  
  9.     tell application ‚ÄúFlightCheck‚Äù
  10.         activate
  11.         get colorlist
  12.     end tell
  13. Getting the Current View
  14. Executing the following script will return the current view for fonts:
  15.  
  16.     tell application ‚ÄúFlightCheck‚Äù
  17.         activate
  18.         get font view
  19.     end tell
  20. Getting the Number of Problems
  21. Executing the following script will return the number of problem images (using the currently selected view):
  22.  
  23.     tell application ‚ÄúFlightCheck‚Äù
  24.         activate
  25.         get image problems
  26.     end tell
  27.  
  28. Conditional Scripts
  29. Executing the following conditional script will return a list of colors only if the current view is ‚ÄúSpot Colors‚Äù, set the current font view to All Fonts only if there are font problems, and will return a list of images only if there are image problems:
  30.  
  31.     tell application ‚ÄúFlightCheck‚Äù
  32.         activate
  33.         if (get color view) = (‚ÄúSpot Colors‚Äù) then get color list
  34.         if (get font problems) > 0 then set font view to All Fonts
  35.         if (get image problems) > 0 then get image list
  36.     end tell
  37.  
  38. Scripting Functions
  39. The list of possible scripting commands is as follows:
  40.  
  41.     COMMAND                          RESULT
  42.     flightcheck ‚Äúfile name‚Äù    FlightCheck named file
  43.     get color list                      returns a list of colors
  44.     get font list                          returns a list of fonts
  45.     get image list                     returns a list of images
  46.     get image names list           returns a list of images by full pathname
  47.     get RGB images                   returns a list of RGB images
  48.  
  49.     set color view to ____    sets the view for colors
  50.                     Used Colors
  51.                     All Colors
  52.                     Spot Colors
  53.                     Process Colors
  54.                     Trapped Colors
  55.                     Unused Colors
  56.                     Mismatched Colors
  57.                     Problem Colors
  58.     set font view to ____    sets the view for fonts
  59.                     All Fonts
  60.                     Active Fonts
  61.                     Database Fonts
  62.                     Missing Fonts
  63.                     Missing PS Fonts
  64.                     Menu Styled
  65.                     Problem Fonts
  66.  
  67.     set image view to ____    sets the view for images
  68.                     All Images
  69.                     Missing Images
  70.                     Modified Images
  71.                     Unused Images
  72.                     Stored Images
  73.                     Bad Resolution
  74.                     OPI Images
  75.                     RGB Images
  76.                     Compressed
  77.                     Fill ‚ÄúNone‚Äù
  78.                     Stylized Images
  79.                     Bitmap Frames
  80.                     Problem Images
  81.  
  82.     get color view        returns the view for colors
  83.     get font view        returns the view for fonts
  84.     get image view        returns the view for images
  85.  
  86.     load ‚Äúcontrols name‚Äù    loads named Ground Controls file
  87.     select set ‚Äúset name‚Äù        selects named Ground Controls set
  88.     get ground controls title    returns name of Ground Controls
  89.     do full flightcheck        recheck file
  90.     get flightcheck results    returns the list of results
  91.     print results            prints the results
  92.     show specific items        opens specific items
  93.     show general items        closes specific items
  94.     print report            prints a FlightCheck report
  95.     save report            saves a FlightCheck report
  96.     save report ‚Äúreport name‚Äù    saves a FlightCheck report to file name
  97.     collect report        saves a collect report 
  98.     collect report ‚Äúreport name‚Äù     save a collect report to file name
  99.     collect job            collects the job
  100.     collect job ‚Äújob name‚Äù    collects job to folder name
  101.     get document title        returns document name
  102.     get application info        returns application info
  103.     get file info            returns file info
  104.     get page info        returns page info
  105.     get page setup info        returns page setup info
  106.     get printer info        returns printer info
  107.     get trap info            returns trap info
  108.     open form ‚Äúform name‚Äù    opens named custom form
  109.     print form            prints the current form
  110.     close form            closes the current form
  111.  
  112. Scripting a Workflow
  113. You can use the following list of AppleScript commands which you can send to FlightCheck in order to create a workflow that can automatically check documents and obtain the results.
  114. Note that lines beginning with ‚Äú‚Äì‚Äù dashes are commented out. Simply remove the dashes at your discretion before running the script:
  115. tell application ‚ÄúFlightCheck‚Äù
  116.     ‚Äìactivate
  117.     with timeout of 120 seconds    --IN CASE OF LARGE FILE
  118.     --flightcheck ‚Äúmy drive:my folder:my document file‚Äù
  119.     --end timeout
  120.         ‚ÄìGET A FILE VIA AN OPEN DIALOG:
  121.             ‚Äìset theFile to choose file
  122.             ‚Äìflightcheck theFile
  123.     ‚Äìload ‚Äúmy drive:my folder:my ground controls file‚Äù
  124.     ‚Äìselect set ‚Äúmy set‚Äù
  125.     ‚Äìdo full flightcheck
  126.     ‚Äìget flightcheck results
  127.     ‚Äìprint report
  128.     ‚Äìsave report
  129.     ‚Äìsave report ‚Äúmy report‚Äù
  130.     ‚Äìcollect report
  131.     ‚Äìcollect report ‚Äúmy report‚Äù
  132.     ‚Äìcollect job
  133.     ‚Äìcollect job ‚Äúmy job‚Äù
  134.     ‚Äìopen form ‚Äúmy drive:my folder:my form file‚Äù
  135.     ‚Äìprint form
  136.     ‚Äìclose form
  137.  
  138. ‚Äìquit application ‚ÄúFlightCheck‚Äù saving no
  139. end tell
  140.